<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: xpt2046/calibrate.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0e80fb08802ded836bfad3909581be7f.html">xpt2046</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">calibrate.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="calibrate_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;stdarg.h&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &lt;math.h&gt;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="user__config_8h.html">user_config.h</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="matrix_8h.html">matrix.h</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#ifdef DISPLAY</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#ifndef XPT2046</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#error XPT2046 is not defined</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="xpt2046_8h.html">xpt2046.h</a>&quot;</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="ili9341_8h.html">display/ili9341.h</a>&quot;</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<a class="code" href="struct__mat.html">mat_t</a> tft_calX;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<a class="code" href="struct__mat.html">mat_t</a> tft_calY;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="keywordtype">int</span> tft_is_calibrated = 0;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="keywordtype">int</span> <a class="code" href="calibrate_8h.html#a9fc562e302f746ea545c9f77309feae2">tft_check_calibrated</a>(<a class="code" href="structwindow.html">window</a> *win)</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;{</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keywordflow">if</span>(!tft_is_calibrated)</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    {</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <a class="code" href="calibrate_8h.html#a83c9d1d7d710cca45a8acb543f745d4c">tft_touch_calibrate</a>(win);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="keywordflow">return</span>(0);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    }</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="keywordflow">return</span>(1);</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;}</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="keywordtype">int</span> <a class="code" href="calibrate_8h.html#a83c9d1d7d710cca45a8acb543f745d4c">tft_touch_calibrate</a>(<a class="code" href="structwindow.html">window</a> *win)</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;{</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordtype">int</span> i;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> w,h,X1,X2,Y1,Y2;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <a class="code" href="struct__mat.html">mat_t</a> MatAI;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <a class="code" href="struct__mat.html">mat_t</a> MatX = <a class="code" href="matrix_8c.html#a5595f5b7a290aaeaf2daf98858bbdac2">MatAlloc</a>(5,1);</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <a class="code" href="struct__mat.html">mat_t</a> MatY = <a class="code" href="matrix_8c.html#a5595f5b7a290aaeaf2daf98858bbdac2">MatAlloc</a>(5,1);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <a class="code" href="struct__mat.html">mat_t</a> MatA = <a class="code" href="matrix_8c.html#a5595f5b7a290aaeaf2daf98858bbdac2">MatAlloc</a>(5,3);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    w = win-&gt;<a class="code" href="structwindow.html#ad89fdeb11ce94e2e7501f7290372d6ae">w</a>;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    h = win-&gt;<a class="code" href="structwindow.html#a822391abd5d09e6ce7152f68cff3ef2b">h</a>;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keywordflow">if</span>(tft_is_calibrated)</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    {</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <a class="code" href="matrix_8c.html#a2b9e8a544e7c2b04934737a30a19c6f6">MatFree</a>(tft_calX);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <a class="code" href="matrix_8c.html#a2b9e8a544e7c2b04934737a30a19c6f6">MatFree</a>(tft_calY);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        tft_is_calibrated = 0;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    }</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <a class="code" href="ili9341_8c.html#a90dda5b7ba495fcca6ab4e5259f6c6fe">tft_fillWin</a>(win, win-&gt;<a class="code" href="structwindow.html#affcf5d29153103c2537542f5a4f8ba87">bg</a>);</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordflow">if</span>(win-&gt;<a class="code" href="structwindow.html#afbd48ebcb41e68d0f458dac593578aa8">rotation</a> &amp; 1)</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <a class="code" href="ili9341_8c.html#aa530634bb661856089c9bc7d78f8805f">tft_set_font</a>(win, 2);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <a class="code" href="ili9341_8c.html#aa530634bb661856089c9bc7d78f8805f">tft_set_font</a>(win, 1);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <a class="code" href="tft__printf_8c.html#ad6d6dda4facdc045d477c0cc9403e0c1">tft_printf</a>(<span class="stringliteral">&quot;Please Calibrate&quot;</span>);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    MatX.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[0][0] = w / 4;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    MatY.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[0][0] = h / 4;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    MatX.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[1][0] = w * 3 / 4;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    MatY.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[1][0] = h / 4;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    MatX.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[2][0] = w / 4;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    MatY.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[2][0] = h * 3 / 4;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    MatX.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[3][0] = w * 3 / 4;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    MatY.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[3][0] = h * 3 / 4;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    MatX.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[4][0] = w / 2;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    MatY.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[4][0] = h / 2;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="preprocessor">#if MATDEBUG &amp; 2</span></div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;X\n&quot;</span>);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <a class="code" href="matrix_8c.html#ac950e582063e7d093f0384c5a35b6024">MatPrint</a>(MatX);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;Y\n&quot;</span>);</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <a class="code" href="matrix_8c.html#ac950e582063e7d093f0384c5a35b6024">MatPrint</a>(MatY);</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keywordflow">for</span>(i=0;i&lt;5;++i)</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    {</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        X1 = MatX.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[i][0];</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        Y1 = MatY.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[i][0];</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        <a class="code" href="ili9341__adafruit_8c.html#a964954bfbc54b4b4e3d5ecf731f1380e">tft_fillCircle</a> (win , X1,Y1, 5 , <a class="code" href="ili9341__adafruit_8h.html#a604507ef031b95291b2d177088fe03e4">ILI9341_WHITE</a>);</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        <a class="code" href="ili9341_8c.html#a2eb6ca3fa55bfe5ecf510bc4b25916fc">tft_set_textpos</a>(win, 0,0);</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <span class="keywordflow">if</span>(win-&gt;<a class="code" href="structwindow.html#afbd48ebcb41e68d0f458dac593578aa8">rotation</a> &amp; 1)</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;            <a class="code" href="ili9341_8c.html#aa530634bb661856089c9bc7d78f8805f">tft_set_font</a>(win, 1);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;            <a class="code" href="ili9341_8c.html#aa530634bb661856089c9bc7d78f8805f">tft_set_font</a>(win, 0);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <a class="code" href="tft__printf_8c.html#ad6d6dda4facdc045d477c0cc9403e0c1">tft_printf</a>(win,<span class="stringliteral">&quot;touch point %3d,%3d&quot;</span>, (<span class="keywordtype">int</span>)X1, (<span class="keywordtype">int</span>)Y1);</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        <a class="code" href="ili9341_8c.html#a9e2f1c5c213183804492d12ab89a1b43">tft_cleareol</a>(win);</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        <span class="comment">// This is the only XPT2046 specific bit of code in the file</span></div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">while</span>( <a class="code" href="xpt2046_8h.html#a69fc6431a2058d4fd8c26af6547cfae5">XPT2046_key</a>((<a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> *)&amp;X2, (<a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> *)&amp;Y2) == 0 )</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;            <a class="code" href="user__task_8c.html#a863d8bc03e69f2efee6042bcec7b456b">optimistic_yield</a>(1000);</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        MatA.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[i][0] = (float)X2;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        MatA.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[i][1] = (float)Y2;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        MatA.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[i][2] = 1.0;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="comment">// reset pixel</span></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <a class="code" href="ili9341__adafruit_8c.html#a964954bfbc54b4b4e3d5ecf731f1380e">tft_fillCircle</a> (win , X1,Y1, 5 , win-&gt;<a class="code" href="structwindow.html#affcf5d29153103c2537542f5a4f8ba87">bg</a>);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        <a class="code" href="ili9341_8c.html#a675036a93108cdafe0b1060ba024c485">tft_drawPixel</a>(win, X1, Y1, win-&gt;<a class="code" href="structwindow.html#affcf5d29153103c2537542f5a4f8ba87">bg</a>);</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    }</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    MatAI = <a class="code" href="matrix_8c.html#a2217661f847795248eb975a64539488e">PseudoInvert</a>(MatA);</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <span class="comment">// Calibration values</span></div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    tft_calX = <a class="code" href="matrix_8c.html#a5539a20ee0f152e7f1e38d36b3dfda20">MatMul</a>(MatAI,MatX);</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    tft_calY = <a class="code" href="matrix_8c.html#a5539a20ee0f152e7f1e38d36b3dfda20">MatMul</a>(MatAI,MatY);</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="preprocessor">#if MATDEBUG &amp; 2</span></div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;A\n&quot;</span>);</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <a class="code" href="matrix_8c.html#ac950e582063e7d093f0384c5a35b6024">MatPrint</a>(MatA);</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;Invert\n&quot;</span>);</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <a class="code" href="matrix_8c.html#ac950e582063e7d093f0384c5a35b6024">MatPrint</a>(MatAI);</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;tft_calX\n&quot;</span>);</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <a class="code" href="matrix_8c.html#ac950e582063e7d093f0384c5a35b6024">MatPrint</a>(tft_calX);</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;tft_calY\n&quot;</span>);</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <a class="code" href="matrix_8c.html#ac950e582063e7d093f0384c5a35b6024">MatPrint</a>(tft_calY);</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <a class="code" href="matrix_8c.html#a2b9e8a544e7c2b04934737a30a19c6f6">MatFree</a>(MatA);</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <a class="code" href="matrix_8c.html#a2b9e8a544e7c2b04934737a30a19c6f6">MatFree</a>(MatX);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <a class="code" href="matrix_8c.html#a2b9e8a544e7c2b04934737a30a19c6f6">MatFree</a>(MatY);</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <a class="code" href="matrix_8c.html#a2b9e8a544e7c2b04934737a30a19c6f6">MatFree</a>(MatAI);</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <span class="keywordflow">return</span>( (tft_is_calibrated = 1) );</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;}</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="keywordtype">int</span> <a class="code" href="calibrate_8h.html#a2473f497b14cf18c390c2927353ff1f3">tft_touch_map</a>(<a class="code" href="structwindow.html">window</a> *win, int16_t *<a class="code" href="cordic_8c.html#a46b4b48ef8c0c01099eb3bcdde8aa8db">X</a>, int16_t *<a class="code" href="cordic_8c.html#ab746e677f466f17031e92ed577fc3c15">Y</a>)</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;{</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    int16_t X2,Y2;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    <span class="keywordtype">float</span> XF,YF;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <span class="keywordflow">if</span>(!<a class="code" href="calibrate_8h.html#a9fc562e302f746ea545c9f77309feae2">tft_check_calibrated</a>(win))</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    {</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        <span class="keywordflow">return</span>(0);</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    }</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    XF = (float)*X;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    YF = (float)*Y;</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<span class="preprocessor">#if MATDEBUG &amp; 2</span></div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;tft_touch_map: raw: X:%.0f,Y:%.0f\n&quot;</span>, (<span class="keywordtype">double</span>)XF, (<span class="keywordtype">double</span>)YF);</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    X2 = (<a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a>)(tft_calX.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[0][0] * XF + tft_calX.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[1][0] * YF + tft_calX.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[2][0]);</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    Y2 = (<a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a>)(tft_calY.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[0][0] * XF + tft_calY.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[1][0] * YF + tft_calY.<a class="code" href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">data</a>[2][0]);</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;<span class="preprocessor">#if MATDEBUG &amp; 2</span></div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;tft_touch_map: cal: X:%3d,Y:%3d\n&quot;</span>, (<span class="keywordtype">int</span>)X2, (<span class="keywordtype">int</span>)Y2);</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="comment">// force result to fix in window limits</span></div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    <a class="code" href="ili9341_8c.html#adfcd8a18cff06d92e9d9c5959a66c9dd">tft_clip_xy</a>(win,X,Y);</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        </div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    *X = X2;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    *Y = Y2;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordflow">return</span>(1);</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;}</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="keywordtype">int</span> <a class="code" href="calibrate_8h.html#ab7e5350b1af8a3d4d68f864880f8a6d8">tft_map_test</a>(<a class="code" href="structwindow.html">window</a> *win, <span class="keywordtype">int</span> points)</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;{</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <span class="keywordtype">int</span> i;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    int16_t X1,Y1;</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    <a class="code" href="ili9341_8c.html#a90dda5b7ba495fcca6ab4e5259f6c6fe">tft_fillWin</a>(win, win-&gt;<a class="code" href="structwindow.html#affcf5d29153103c2537542f5a4f8ba87">bg</a>);</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    <span class="keywordflow">if</span>(win-&gt;<a class="code" href="structwindow.html#afbd48ebcb41e68d0f458dac593578aa8">rotation</a> &amp; 1)</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        <a class="code" href="ili9341_8c.html#aa530634bb661856089c9bc7d78f8805f">tft_set_font</a>(win, 1);</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        <a class="code" href="ili9341_8c.html#aa530634bb661856089c9bc7d78f8805f">tft_set_font</a>(win, 0);</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    <a class="code" href="tft__printf_8c.html#ad6d6dda4facdc045d477c0cc9403e0c1">tft_printf</a>(win,<span class="stringliteral">&quot;press %d points&quot;</span>, points);</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    <span class="keywordflow">if</span>(!<a class="code" href="calibrate_8h.html#a9fc562e302f746ea545c9f77309feae2">tft_check_calibrated</a>(win))</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    {</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        <span class="keywordflow">return</span>(0);</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    }</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <span class="keywordflow">for</span>(i=0;i&lt;points;++i)</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    {</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        <span class="keywordflow">while</span>( <a class="code" href="xpt2046_8h.html#a69fc6431a2058d4fd8c26af6547cfae5">XPT2046_key</a>((<a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> *)&amp;X1, (<a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> *)&amp;Y1) == 0 )</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;            <a class="code" href="user__task_8c.html#a863d8bc03e69f2efee6042bcec7b456b">optimistic_yield</a>(1000);</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        <a class="code" href="calibrate_8h.html#a2473f497b14cf18c390c2927353ff1f3">tft_touch_map</a>(win,&amp;X1,&amp;Y1);</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        <a class="code" href="ili9341__adafruit_8c.html#a964954bfbc54b4b4e3d5ecf731f1380e">tft_fillCircle</a> (win , X1,Y1, 5 , <a class="code" href="ili9341__adafruit_8h.html#a604507ef031b95291b2d177088fe03e4">ILI9341_WHITE</a>);</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;    }</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;    <span class="keywordflow">return</span>(1);</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;}</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;<span class="keywordtype">int</span> <a class="code" href="calibrate_8h.html#a19006a3db3c542e9fa1583ed117faf55">tft_touch_xy_raw</a>(<a class="code" href="structwindow.html">window</a> *win, <a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> *X, <a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> *Y)</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;{</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    <span class="keywordtype">int</span> T;</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    T = <a class="code" href="xpt2046_8h.html#a02c4dcf896824df15a98acfbe045d19d">XPT2046_xy_raw</a>(X, Y);</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    <a class="code" href="calibrate_8h.html#a2473f497b14cf18c390c2927353ff1f3">tft_touch_map</a>(win,X,Y);</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    <span class="keywordflow">return</span>(T);</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;}</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;<span class="keywordtype">int</span> <a class="code" href="calibrate_8h.html#a09b17e588fbbddac40169119e4df6df5">tft_touch_xy</a>(<a class="code" href="structwindow.html">window</a> *win, <a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> *X, <a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> *Y)</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;{</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    <span class="keywordtype">int</span> T;</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    T = <a class="code" href="xpt2046_8h.html#ac22e4f7d0ddbfd16b0c685f90db56656">XPT2046_xy_filtered</a>(X, Y);</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    <a class="code" href="calibrate_8h.html#a2473f497b14cf18c390c2927353ff1f3">tft_touch_map</a>(win,X,Y);</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    <span class="keywordflow">return</span>(T);</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;}</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    </div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;<span class="keywordtype">int</span> <a class="code" href="calibrate_8h.html#a2a4887d61a42c61637c4551c73608e4a">tft_touch_key</a>(<a class="code" href="structwindow.html">window</a> *win, <a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> *X, <a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> *Y)</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;{</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;    <span class="keywordtype">int</span> T;</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;    T = <a class="code" href="xpt2046_8h.html#a69fc6431a2058d4fd8c26af6547cfae5">XPT2046_key</a>(X,Y);</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;    <a class="code" href="calibrate_8h.html#a2473f497b14cf18c390c2927353ff1f3">tft_touch_map</a>(win,X,Y);</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    <span class="keywordflow">return</span>(T);</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;}</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;<span class="preprocessor">#endif  //DISPLAY</span></div><div class="ttc" id="structwindow_html_ad89fdeb11ce94e2e7501f7290372d6ae"><div class="ttname"><a href="structwindow.html#ad89fdeb11ce94e2e7501f7290372d6ae">window::w</a></div><div class="ttdeci">int16_t w</div><div class="ttdef"><b>Definition:</b> <a href="ili9341_8h_source.html#l00040">ili9341.h:40</a></div></div>
<div class="ttc" id="calibrate_8h_html_a2473f497b14cf18c390c2927353ff1f3"><div class="ttname"><a href="calibrate_8h.html#a2473f497b14cf18c390c2927353ff1f3">tft_touch_map</a></div><div class="ttdeci">MEMSPACE int tft_touch_map(window *win, int16_t *X, int16_t *Y)</div></div>
<div class="ttc" id="struct__mat_html_a00dcd82a8de11b7f16f7edfde55bcfae"><div class="ttname"><a href="struct__mat.html#a00dcd82a8de11b7f16f7edfde55bcfae">_mat::data</a></div><div class="ttdeci">float ** data</div><div class="ttdef"><b>Definition:</b> <a href="matrix_8h_source.html#l00028">matrix.h:28</a></div></div>
<div class="ttc" id="ili9341_8c_html_a2eb6ca3fa55bfe5ecf510bc4b25916fc"><div class="ttname"><a href="ili9341_8c.html#a2eb6ca3fa55bfe5ecf510bc4b25916fc">tft_set_textpos</a></div><div class="ttdeci">MEMSPACE void tft_set_textpos(window *win, int16_t x, int16_t y)</div><div class="ttdoc">Set current window text pointer in characters (per current rotation) - overall font bounding box...</div><div class="ttdef"><b>Definition:</b> <a href="ili9341_8c_source.html#l01254">ili9341.c:1254</a></div></div>
<div class="ttc" id="structwindow_html_a822391abd5d09e6ce7152f68cff3ef2b"><div class="ttname"><a href="structwindow.html#a822391abd5d09e6ce7152f68cff3ef2b">window::h</a></div><div class="ttdeci">int16_t h</div><div class="ttdef"><b>Definition:</b> <a href="ili9341_8h_source.html#l00041">ili9341.h:41</a></div></div>
<div class="ttc" id="send_8c_html_a273cf69d639a59973b6019625df33e30"><div class="ttname"><a href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a></div><div class="ttdeci">unsigned short uint16_t</div><div class="ttdef"><b>Definition:</b> <a href="send_8c_source.html#l00018">send.c:18</a></div></div>
<div class="ttc" id="user__config_8h_html"><div class="ttname"><a href="user__config_8h.html">user_config.h</a></div><div class="ttdoc">Master include file for project Includes all project includes and defines here. </div></div>
<div class="ttc" id="structwindow_html_affcf5d29153103c2537542f5a4f8ba87"><div class="ttname"><a href="structwindow.html#affcf5d29153103c2537542f5a4f8ba87">window::bg</a></div><div class="ttdeci">uint16_t bg</div><div class="ttdef"><b>Definition:</b> <a href="ili9341_8h_source.html#l00045">ili9341.h:45</a></div></div>
<div class="ttc" id="matrix_8c_html_ac950e582063e7d093f0384c5a35b6024"><div class="ttname"><a href="matrix_8c.html#ac950e582063e7d093f0384c5a35b6024">MatPrint</a></div><div class="ttdeci">MEMSPACE void MatPrint(mat_t matrix)</div><div class="ttdoc">Print a matrix. </div><div class="ttdef"><b>Definition:</b> <a href="matrix_8c_source.html#l00187">matrix.c:187</a></div></div>
<div class="ttc" id="cordic_8c_html_a46b4b48ef8c0c01099eb3bcdde8aa8db"><div class="ttname"><a href="cordic_8c.html#a46b4b48ef8c0c01099eb3bcdde8aa8db">X</a></div><div class="ttdeci">Cordic_T X</div><div class="ttdoc">Main Cordic routine - used for basic trig and vector rotations We use fixed point numbers...</div><div class="ttdef"><b>Definition:</b> <a href="cordic_8c_source.html#l00102">cordic.c:102</a></div></div>
<div class="ttc" id="structwindow_html_afbd48ebcb41e68d0f458dac593578aa8"><div class="ttname"><a href="structwindow.html#afbd48ebcb41e68d0f458dac593578aa8">window::rotation</a></div><div class="ttdeci">uint8_t rotation</div><div class="ttdef"><b>Definition:</b> <a href="ili9341_8h_source.html#l00046">ili9341.h:46</a></div></div>
<div class="ttc" id="ili9341__adafruit_8h_html_a604507ef031b95291b2d177088fe03e4"><div class="ttname"><a href="ili9341__adafruit_8h.html#a604507ef031b95291b2d177088fe03e4">ILI9341_WHITE</a></div><div class="ttdeci">#define ILI9341_WHITE</div><div class="ttdef"><b>Definition:</b> <a href="ili9341__adafruit_8h_source.html#l00161">ili9341_adafruit.h:161</a></div></div>
<div class="ttc" id="cordic_8c_html_ab746e677f466f17031e92ed577fc3c15"><div class="ttname"><a href="cordic_8c.html#ab746e677f466f17031e92ed577fc3c15">Y</a></div><div class="ttdeci">Cordic_T Y</div><div class="ttdef"><b>Definition:</b> <a href="cordic_8c_source.html#l00102">cordic.c:102</a></div></div>
<div class="ttc" id="ili9341_8c_html_aa530634bb661856089c9bc7d78f8805f"><div class="ttname"><a href="ili9341_8c.html#aa530634bb661856089c9bc7d78f8805f">tft_set_font</a></div><div class="ttdeci">MEMSPACE void tft_set_font(window *win, uint16_t index)</div><div class="ttdoc">Set current font size (per current rotation) </div><div class="ttdef"><b>Definition:</b> <a href="ili9341_8c_source.html#l01267">ili9341.c:1267</a></div></div>
<div class="ttc" id="calibrate_8h_html_a19006a3db3c542e9fa1583ed117faf55"><div class="ttname"><a href="calibrate_8h.html#a19006a3db3c542e9fa1583ed117faf55">tft_touch_xy_raw</a></div><div class="ttdeci">MEMSPACE int tft_touch_xy_raw(window *win, uint16_t *X, uint16_t *Y)</div></div>
<div class="ttc" id="user__task_8c_html_a863d8bc03e69f2efee6042bcec7b456b"><div class="ttname"><a href="user__task_8c.html#a863d8bc03e69f2efee6042bcec7b456b">optimistic_yield</a></div><div class="ttdeci">void optimistic_yield(uint32_t interval_us)</div><div class="ttdef"><b>Definition:</b> <a href="user__task_8c_source.html#l00102">user_task.c:102</a></div></div>
<div class="ttc" id="matrix_8c_html_a5595f5b7a290aaeaf2daf98858bbdac2"><div class="ttname"><a href="matrix_8c.html#a5595f5b7a290aaeaf2daf98858bbdac2">MatAlloc</a></div><div class="ttdeci">MEMSPACE mat_t MatAlloc(int rows, int cols)</div><div class="ttdoc">Allocate a matrix. </div><div class="ttdef"><b>Definition:</b> <a href="matrix_8c_source.html#l00048">matrix.c:48</a></div></div>
<div class="ttc" id="calibrate_8h_html_a9fc562e302f746ea545c9f77309feae2"><div class="ttname"><a href="calibrate_8h.html#a9fc562e302f746ea545c9f77309feae2">tft_check_calibrated</a></div><div class="ttdeci">MEMSPACE int tft_check_calibrated(window *win)</div></div>
<div class="ttc" id="xpt2046_8h_html_a02c4dcf896824df15a98acfbe045d19d"><div class="ttname"><a href="xpt2046_8h.html#a02c4dcf896824df15a98acfbe045d19d">XPT2046_xy_raw</a></div><div class="ttdeci">int XPT2046_xy_raw(uint16_t *X, uint16_t *Y)</div></div>
<div class="ttc" id="struct__mat_html"><div class="ttname"><a href="struct__mat.html">_mat</a></div><div class="ttdef"><b>Definition:</b> <a href="matrix_8h_source.html#l00027">matrix.h:27</a></div></div>
<div class="ttc" id="ili9341_8c_html_adfcd8a18cff06d92e9d9c5959a66c9dd"><div class="ttname"><a href="ili9341_8c.html#adfcd8a18cff06d92e9d9c5959a66c9dd">tft_clip_xy</a></div><div class="ttdeci">MEMSPACE void tft_clip_xy(window *win, int16_t *X, int16_t *Y)</div><div class="ttdoc">Clip X,Y to fix inside specifiied window. </div><div class="ttdef"><b>Definition:</b> <a href="ili9341_8c_source.html#l01114">ili9341.c:1114</a></div></div>
<div class="ttc" id="calibrate_8h_html_ab7e5350b1af8a3d4d68f864880f8a6d8"><div class="ttname"><a href="calibrate_8h.html#ab7e5350b1af8a3d4d68f864880f8a6d8">tft_map_test</a></div><div class="ttdeci">MEMSPACE int tft_map_test(window *win, int points)</div></div>
<div class="ttc" id="matrix_8h_html"><div class="ttname"><a href="matrix_8h.html">matrix.h</a></div><div class="ttdoc">matrix functions </div></div>
<div class="ttc" id="ili9341_8c_html_a675036a93108cdafe0b1060ba024c485"><div class="ttname"><a href="ili9341_8c.html#a675036a93108cdafe0b1060ba024c485">tft_drawPixel</a></div><div class="ttdeci">void tft_drawPixel(window *win, int16_t x, int16_t y, int16_t color)</div><div class="ttdoc">Pixel functions </div><div class="ttdef"><b>Definition:</b> <a href="ili9341_8c_source.html#l00717">ili9341.c:717</a></div></div>
<div class="ttc" id="xpt2046_8h_html_ac22e4f7d0ddbfd16b0c685f90db56656"><div class="ttname"><a href="xpt2046_8h.html#ac22e4f7d0ddbfd16b0c685f90db56656">XPT2046_xy_filtered</a></div><div class="ttdeci">MEMSPACE int XPT2046_xy_filtered(uint16_t *X, uint16_t *Y)</div></div>
<div class="ttc" id="xpt2046_8h_html_a69fc6431a2058d4fd8c26af6547cfae5"><div class="ttname"><a href="xpt2046_8h.html#a69fc6431a2058d4fd8c26af6547cfae5">XPT2046_key</a></div><div class="ttdeci">MEMSPACE int XPT2046_key(uint16_t *X, uint16_t *Y)</div></div>
<div class="ttc" id="cpu_8h_html_ad0fe97585b8891f5e4f2b9a6426330a4"><div class="ttname"><a href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="ttdeci">#define MEMSPACE</div><div class="ttdef"><b>Definition:</b> <a href="cpu_8h_source.html#l00025">cpu.h:25</a></div></div>
<div class="ttc" id="calibrate_8h_html_a09b17e588fbbddac40169119e4df6df5"><div class="ttname"><a href="calibrate_8h.html#a09b17e588fbbddac40169119e4df6df5">tft_touch_xy</a></div><div class="ttdeci">MEMSPACE int tft_touch_xy(window *win, uint16_t *X, uint16_t *Y)</div></div>
<div class="ttc" id="ili9341_8c_html_a90dda5b7ba495fcca6ab4e5259f6c6fe"><div class="ttname"><a href="ili9341_8c.html#a90dda5b7ba495fcca6ab4e5259f6c6fe">tft_fillWin</a></div><div class="ttdeci">void tft_fillWin(window *win, uint16_t color)</div><div class="ttdoc">Fill functions </div><div class="ttdef"><b>Definition:</b> <a href="ili9341_8c_source.html#l00334">ili9341.c:334</a></div></div>
<div class="ttc" id="matrix_8c_html_a2b9e8a544e7c2b04934737a30a19c6f6"><div class="ttname"><a href="matrix_8c.html#a2b9e8a544e7c2b04934737a30a19c6f6">MatFree</a></div><div class="ttdeci">MEMSPACE void MatFree(mat_t matF)</div><div class="ttdoc">Free a matrix. </div><div class="ttdef"><b>Definition:</b> <a href="matrix_8c_source.html#l00116">matrix.c:116</a></div></div>
<div class="ttc" id="mathio_8h_html_ad6078f8da2d30ecaef99e0c2d250c0c8"><div class="ttname"><a href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a></div><div class="ttdeci">MEMSPACE int printf(const char *format,...)</div></div>
<div class="ttc" id="matrix_8c_html_a5539a20ee0f152e7f1e38d36b3dfda20"><div class="ttname"><a href="matrix_8c.html#a5539a20ee0f152e7f1e38d36b3dfda20">MatMul</a></div><div class="ttdeci">MEMSPACE mat_t MatMul(mat_t MatA, mat_t MatB)</div><div class="ttdoc">Multiply two matrix. </div><div class="ttdef"><b>Definition:</b> <a href="matrix_8c_source.html#l00490">matrix.c:490</a></div></div>
<div class="ttc" id="structwindow_html"><div class="ttname"><a href="structwindow.html">window</a></div><div class="ttdef"><b>Definition:</b> <a href="ili9341_8h_source.html#l00034">ili9341.h:34</a></div></div>
<div class="ttc" id="ili9341_8c_html_a9e2f1c5c213183804492d12ab89a1b43"><div class="ttname"><a href="ili9341_8c.html#a9e2f1c5c213183804492d12ab89a1b43">tft_cleareol</a></div><div class="ttdeci">MEMSPACE void tft_cleareol(window *win)</div><div class="ttdoc">Character and String functions </div><div class="ttdef"><b>Definition:</b> <a href="ili9341_8c_source.html#l01601">ili9341.c:1601</a></div></div>
<div class="ttc" id="ili9341__adafruit_8c_html_a964954bfbc54b4b4e3d5ecf731f1380e"><div class="ttname"><a href="ili9341__adafruit_8c.html#a964954bfbc54b4b4e3d5ecf731f1380e">tft_fillCircle</a></div><div class="ttdeci">MEMSPACE void tft_fillCircle(window *win, int16_t x0, int16_t y0, int16_t r, uint16_t color)</div><div class="ttdoc">Fill circle. </div><div class="ttdef"><b>Definition:</b> <a href="ili9341__adafruit_8c_source.html#l00346">ili9341_adafruit.c:346</a></div></div>
<div class="ttc" id="ili9341_8h_html"><div class="ttname"><a href="ili9341_8h.html">ili9341.h</a></div><div class="ttdoc">ili9341 driver inspired by Adafruit ili9341 code All code in this file has been rewritten by Mike Gor...</div></div>
<div class="ttc" id="tft__printf_8c_html_ad6d6dda4facdc045d477c0cc9403e0c1"><div class="ttname"><a href="tft__printf_8c.html#ad6d6dda4facdc045d477c0cc9403e0c1">tft_printf</a></div><div class="ttdeci">MEMSPACE int tft_printf(window *win, const char *fmt,...)</div><div class="ttdoc">tft_printf function </div><div class="ttdef"><b>Definition:</b> <a href="tft__printf_8c_source.html#l00052">tft_printf.c:52</a></div></div>
<div class="ttc" id="xpt2046_8h_html"><div class="ttname"><a href="xpt2046_8h.html">xpt2046.h</a></div></div>
<div class="ttc" id="calibrate_8h_html_a2a4887d61a42c61637c4551c73608e4a"><div class="ttname"><a href="calibrate_8h.html#a2a4887d61a42c61637c4551c73608e4a">tft_touch_key</a></div><div class="ttdeci">MEMSPACE int tft_touch_key(window *win, uint16_t *X, uint16_t *Y)</div></div>
<div class="ttc" id="calibrate_8h_html_a83c9d1d7d710cca45a8acb543f745d4c"><div class="ttname"><a href="calibrate_8h.html#a83c9d1d7d710cca45a8acb543f745d4c">tft_touch_calibrate</a></div><div class="ttdeci">MEMSPACE int tft_touch_calibrate(window *win)</div></div>
<div class="ttc" id="matrix_8c_html_a2217661f847795248eb975a64539488e"><div class="ttname"><a href="matrix_8c.html#a2217661f847795248eb975a64539488e">PseudoInvert</a></div><div class="ttdeci">MEMSPACE mat_t PseudoInvert(mat_t MatA)</div><div class="ttdoc">Calculate Pseudo Matrix Inverse Used for least square fitting of non square matrix with excess soluti...</div><div class="ttdef"><b>Definition:</b> <a href="matrix_8c_source.html#l00456">matrix.c:456</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:16 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
